1. Field of the Invention
The present invention relates generally to a color interpolation, and more particularly, to a Bayer array interpolation method. The disclosure of the present invention can be applied to an image processing apparatus and method.
2. Description of the Prior Art
The human visual system (HVS) has three types of cones namely long-cone, medium-cone, and short-cone which sense light wave length corresponding to red, green, and blue colors, respectively. The visual cortex of the human brain then takes signals from these three types of cones and performs interpolation to form a perceived image. The significance of this biological structure of the human visual system is to dramatically reduce an enormous amount of entire visible spectrum information needed to be processed into only three-color components.
Digital image sensors in digital cameras are therefore designed to be analogous to the cones of the human visual system. One most commonly used image sensor array is called Bayer filter sensor array 100 located in a Bayer pattern image sensor 10, as shown in FIG. 1, taught by Bryce E. Bayer in U.S. Pat. No. 3,971,065. A Bayer filter array has red, green, and blue color filter micro lenses superimposed on the photo sensors to respectively acquire spectrum information of long-, medium, and short-wavelengths. Furthermore, the Bayer filter array samples the green information on a quincunx grip and the red and the blue information on a rectangular grid. The green information is sampled at a higher frequency because the peak sensitivity of the human visual system lies in the medium wavelengths. The missing color information of the other two colors of an individual photo sensor is then interpolated using the color values of neighboring pixels.
FIG. 2 shows color interpolation cases for the 3×3 Bayer filter array. Case I and Case IV are green (G) center, so the color components needed to be interpolated are red and blue colors. Case II is red (R) center, so the color components to be interpolated are green and blue. Case III is blue (B) center, so the color components to be interpolated are green and red.
For convenience, pixels in the 3×3 block of each Bayer array case can be assigned to the numbers shown in FIG. 3.
A direct method for Bayer array interpolation in the prior arts is to exploit a linear interpolation and the missing pixels of each Bayer array case are interpolated as follows:
Case I:R=(a3+a5)/2B=(a1+a7)/2
Case II:G=(a1+a3+a5+a7)/4B=(a0+a2+a6+a8)/4
Case III:G=(a1+a3+a5+a7)/4R=(a0+a2+a6+a8)/4
Case IV:R=(a1+a7)/2B=(a3+a5)/2
Another method for the Bayer array interpolation in the prior arts is taught by Robert H. Hibbard in U.S. Pat. No. 5,382,976 and Laroche, et al. in U.S. Pat. No. 5,373,322. The disclosure is to exploit the edge information to determine the neighbor pixels to be used for interpolation. One example of such method is shown in FIG. 4. The procedure first inputs a 3×3 Bayer pattern block, as shown in step S10. In step S12, the Bayer array case of the input block is determined according to those shown in FIG. 2. In step S14, the Bayer array case is classified into two categories: green pixel center and not green pixel center. If the center pixel is not the green pixel, then the Bayer cases are Case II and Case III, so the green pixel differences are calculated in step S16 asH_diff=|a3−a5| andV_diff=|a1−a7|.
The missing green pixel is then interpolated in step S20 asif H_diff<V_diffG=(a3+a5)/2else if V_diff<H_diffG=(a1+a7)/2
elseG=(a1+a3+a5+a7)/4.
The missing red or blue pixel is then interpolated in step S22 as if Case IIB=(a0+a2+a6+a8)/4
else if Case IIIR=(a0+a2+a6+a8)/4.
On the other hand, if the center pixel is green, then the missing red and blue pixels are interpolated in step S18 as
if Case IR=(a3+a5)/2B=(a1+a7)/2
else if Case IVR=(a1+a7)/2B=(a3+a5)/2.
However, if the missing color pixels of Bayer color filter array are interpolated by using the above mentioned methods, the color differences among all three-color pixels may become significant and results in an unpleasant color aberration occurring at high transition edges. Furthermore, in order to better reconstructing the missing pixels, Laroche, et al. in U.S. Pat. No. 5,373,322 and Peter N. Martin in U.S. Pat. No. 6,549,233 teach a wider Bayer filter array with more neighbor pixels, that adversely increases the implementation cost for the hardware implementation. D. Alleysson, S. Susstrunk, and J. Herault teach “Linear Demosaicing inspired by the Human Visual System”, in IEEE Transaction of Image Processing, vol. 14, No. 4, April 2005, pp. 439-449. The disclosure of D. Alleysson, et al. is more complicated Bayer filter array interpolation methods even requiring the interpolation process to be performed in the frequency domain. Endo, et al. in U.S. Pat. No. 6,853,748 and Acharya, et al. U.S. Pat. No. 6,917,381 teach multiplication and division methods for the Bayer array interpolation, that also increases the hardware implementation cost.